<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
		
				
				<table class="table table-condensed table-bordered table-hover">
					<tr>
						<th><input type="checkbox" name="checkAll" onclick="checkAll();"></th>
						<th>标题</th>
						<th>作者</th>
						<th>类别</th>
						<th>创建时间</th>
						<th>
							<button id="add_btn" class="btn btn-small btn-primary" onclick="add('article')">添加</button>
							<button id="del_btn" class="btn btn-small btn-primary" onclick="del('article');">删除</button>
						</th>
					</tr>
					<c:forEach items="${pageModel.list }" var="article">
						<tr dataid=${article.id }>
							<td align="center" width="20">
								<input type="checkbox" name="ck" onclick="checkOne();">
							</td>
							<td>${article.title}</td>
							<td>${article.author}</td>
							<td>${article.categoryName}</td>
							<td>${article.createTimeStr}</td>
							<td>
								<button class="btn btn-small" onclick="edit('article',${article.id})">修改</button>
							</td>
						</tr>
					</c:forEach>
				</table>
				
				<p id="pager">
				
			
    
<script type="text/javascript">
   $(document).ready(function() {
	   	if(${pageModel.totalPage >1}){
	  		 $("#pager").pager({ 
	           	pagenumber: "${pageModel.currentPage}", 
	           	pagecount: "${pageModel.totalPage}", 
	           	buttonClickCallback: function(page){
	           		$('#div_right').load("/article/manage",{page:page});
	           	}
	           });
	  		}
   });
	   	
</script>
